Learning Firefox OS Application Development by Pant Tanay

Learning Firefox OS Application Development by Pant Tanay

Author:Pant, Tanay
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2015-10-09T04:00:00+00:00


Introducing Web APIs

Web APIs is a collective term used for various APIs that are available to JavaScript in the window context of a loaded HTML document. Firefox OS has additional Web APIs for hardware capabilities on smartphones and tablets, which do not usually exist on desktop or laptop computers. For example, the camera API can be used to open the camera of the device whenever required by a Firefox OS app. There are various APIs that have access to sensitive data, such as the contacts and settings API. Further in this chapter, you will study most of these APIs in detail.

According to Mozilla, there are more than 30 standard WebAPIs for Firefox OS. These APIs assist a developer to gain privileges for interacting with the hardware component of the device. For security purposes, not all of the APIs are open for developers to use in their projects directly, and these APIs require a certified level of permission. This permission is not for third-party developers, and is only available for OEMs and device manufacturers (built-in applications).

We need to specify the following permission levels in the manifest file (to use the APIs listed under them):

Certified level: This permission is not available for third-party developers but only available for OEMs and device manufacturers. APIs such as Bluetooth and Web SMS require a certified permission to use them.

Privileged level: This is given to every third-party developer, but after explicitly mentioning the usage of the API in the manifest file of the application. Applications made using this set of APIs come under privileged apps such as the contacts and device storage API.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.